package app.controller.core
{
	import app.model.flare.proxies.FlareDataProxy;
	
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.command.SimpleCommand;

	public class CreateNewActionCmd extends SimpleCommand
	{
		override public function execute(notification:INotification):void{
			var proxy:FlareDataProxy,
				fromName:String,
				toName:String,
				actionName:String,
				split:Array;
			split = notification.getBody().toString().split(":")
			fromName = split[0];
			toName = split[1];
			actionName = notification.getType();
			proxy = FlareDataProxy( facade.retrieveProxy( FlareDataProxy.NAME ) );
			proxy.addAction( fromName, toName, actionName );
		}
		
	}
}